﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Collections;

namespace OPMS_V1
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            //ArrayList holder  = new ArrayList();
            /*Application["status"] = "";
            Application["propertyType"] = "";
            Application["TaskID"] = "";*/

        }

        protected void Session_Start(object sender, EventArgs e)
        {
            Session["statusPage"] = "";
            Session["propertyAdType"] = "";
            Session["TaskID"] = "";
            Session["user"] = "";
            Session["InventoryID"]="";
            Session["EditOption"] = "";
            
            //These sessions are used for Property Address:
            Session["propertyID"] = "";
            Session["landlordID"] = "";
            Session["PropertyName"] = "";
            Session["PropertyNo"] = "";
            Session["StreetName"] = "";
            Session["StreetNo"] = "";
            Session["Area"] = "";
            Session["PostCode"] = "";
            Session["State"] = "";
            Session["AreaID"] = "";

            //These sessions are used for Pricing Details
            Session["status"] = "";
            Session["FixedPrice"] = "";
            Session["Bond"] = "";
            Session["PriceRangeFrom"] = "";
            Session["PriceRangeTo"] = "";

            //These sessions are used for Property Details
            Session["PropertyStatus"] = "";
            Session["PropertyType"] = "";

            //For House
            Session["BedroomNo"] = "";
            Session["BathroomNo"] = "";
            Session["FloorNo"] = "";
            Session["HouseSize"] = "";
            Session["YearBuilt"] = "";

            //For Land
            Session["NumberHomes"] = "";
            Session["Standard"] = "";
            Session["NonStandard"] = "";
            Session["Frontage"] = "";
            Session["Depth"] = "";
            Session["StreetFacing"] = "";
            Session["StreetWidth"] = "";

            //These session is used for Dwelling Details
            Session["Dwellings"] = "";

            //These session is used for Property Description.
            Session["Heading"] = "";
            Session["Description"] = "";

            //These session is used for Contact Details
            Session["FirstName"] = "";
            Session["LastName"] = "";
            Session["ContactMethod"] = "";
            Session["Email"] = "";
            Session["Phone"] = "";

            //These session variables is used for Personal Details
            Session["LogLandLordID"] = "";
            Session["LFname"] = "";
            Session["LLname"] = "";
            Session["Lsex"] = "";
            Session["LDOB"] = "";
            Session["LPhone"] = "";
            Session["LStreetNum"] = "";
            Session["LStreetName"] = "";
            Session["LPostCode"] = "";
            Session["LArea"] = "";
            Session["LState"] = "";
            Session["LEmail"] = "";
            Session["propertyID"] = "";
            Session["recordExists"] = "";

            //This session is used for the feedback entries
            Session["Symbol"] = "";
            Session["FeedbackType"] = "";
        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {
            /*
            Session["statusPage"] = "";
            Session["propertyAdType"] = "";
            Session["TaskID"] = "";
            Session["user"] = "";
            Session["InventoryID"] = "";
            Session["EditOption"] = "";

            //These sessions are used for Property Address:
            Session["propertyID"] = "";
            Session["landlordID"] = "";
            Session["PropertyName"] = "";
            Session["PropertyNo"] = "";
            Session["StreetName"] = "";
            Session["StreetNo"] = "";
            Session["Area"] = "";
            Session["PostCode"] = "";
            Session["State"] = "";
            Session["AreaID"] = "";

            //These sessions are used for Pricing Details
            Session["status"] = "";
            Session["FixedPrice"] = "";
            Session["Bond"] = "";
            Session["PriceRangeFrom"] = "";
            Session["PriceRangeTo"] = "";

            //These sessions are used for Property Details
            Session["PropertyStatus"] = "";
            Session["PropertyType"] = "";

            //For House
            Session["BedroomNo"] = "";
            Session["BathroomNo"] = "";
            Session["FloorNo"] = "";
            Session["HouseSize"] = "";
            Session["YearBuilt"] = "";

            //For Land
            Session["NumberHomes"] = "";
            Session["Standard"] = "";
            Session["NonStandard"] = "";
            Session["Frontage"] = "";
            Session["Depth"] = "";
            Session["StreetFacing"] = "";
            Session["StreetWidth"] = "";

            //These session is used for Dwelling Details
            Session["Dwellings"] = "";

            //These session is used for Property Description.
            Session["Heading"] = "";
            Session["Description"] = "";

            //These session is used for Contact Details
            Session["FirstName"] = "";
            Session["LastName"] = "";
            Session["ContactMethod"] = "";
            Session["Email"] = "";
            Session["Phone"] = "";

            //These session variables is used for Personal Details
            Session["LogLandLordID"] = "";
            Session["LFname"] = "";
            Session["LLname"] = "";
            Session["Lsex"] = "";
            Session["LDOB"] = "";
            Session["LPhone"] = "";
            Session["LStreetNum"] = "";
            Session["LStreetName"] = "";
            Session["LPostCode"] = "";
            Session["LArea"] = "";
            Session["LState"] = "";
            Session["LEmail"] = "";
            Session["propertyID"] = "";
            Session["recordExists"] = "";
             * */
        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}